(rmail-summary-mark-deleted): Check for end of buffer.
authorRichard M. Stallman <rms@gnu.org>
Tue, 25 May 1993 21:20:08 +0000 (21:20 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 25 May 1993 21:20:08 +0000 (21:20 +0000)
Pass t as NOWARN when calling rmail-summary-goto-msg.

lisp/mail/rmailsum.el

index bccfc9eb8f4806a2ea7a871d8fda84d69decc2e8..d4b629d0a89eab51c29f5f5129bf48cd392e69d9 100644 (file)
@@ -392,15 +392,16 @@ Deleted messages stay in the file until the \\[rmail-expunge] command is given."
   (rmail-summary-delete-forward t))
 
 (defun rmail-summary-mark-deleted (&optional n undel)
-  (and n (rmail-summary-goto-msg n nil t))
-  (let ((buffer-read-only nil))
-    (skip-chars-forward " ")
-    (skip-chars-forward "[0-9]")
-    (if undel
-       (if (looking-at "D")
-           (progn (delete-char 1) (insert " ")))
-      (delete-char 1)
-      (insert "D")))
+  (and n (rmail-summary-goto-msg n t t))
+  (or (eobp)
+      (let ((buffer-read-only nil))
+       (skip-chars-forward " ")
+       (skip-chars-forward "[0-9]")
+       (if undel
+           (if (looking-at "D")
+               (progn (delete-char 1) (insert " ")))
+         (delete-char 1)
+         (insert "D"))))
   (beginning-of-line))
 
 (defun rmail-summary-mark-undeleted (n)